Use C_() instead of Q_(). String change!
authorMatthias Clasen <mclasen@redhat.com>
Mon, 27 Oct 2008 01:42:28 +0000 (01:42 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Mon, 27 Oct 2008 01:42:28 +0000 (01:42 +0000)
2008-10-26  Matthias Clasen  <mclasen@redhat.com>

        * gtk/gtkaccellabel.c:
        * gtk/gtkcalendar.c:
        * gtk/gtkcellrendereraccel.c:
        * gtk/gtkcellrendererprogress.c:
        * gtk/gtkimmulticontext.c:
        * gtk/gtkrecentchoosermenu.c:
        * gtk/gtkvolumebutton.c: Use C_() instead of Q_(). String change!

svn path=/trunk/; revision=21716

ChangeLog
gtk/gtkaccellabel.c
gtk/gtkcalendar.c
gtk/gtkcellrendereraccel.c
gtk/gtkcellrendererprogress.c
gtk/gtkimmulticontext.c
gtk/gtkrecentchoosermenu.c
gtk/gtkvolumebutton.c
po/Makefile.in.in

index 72644fb6ea7994aae625457805b983c9aa8a1d3a..68c715622f1f5498cdac0ed3b8f337ac02eb5918 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-10-26  Matthias Clasen  <mclasen@redhat.com>
+
+       * gtk/gtkaccellabel.c:
+       * gtk/gtkcalendar.c:
+       * gtk/gtkcellrendereraccel.c:
+       * gtk/gtkcellrendererprogress.c:
+       * gtk/gtkimmulticontext.c:
+       * gtk/gtkrecentchoosermenu.c:
+       * gtk/gtkvolumebutton.c: Use C_() instead of Q_(). String change!
+
 2008-10-26  Christian Persch  <chpe@gnome.org>
 
        Bug 557065 – gtkcellrendererpixbuf spams console over and over with
index e61ee9caf183e859c4214f527cdcc1ab182110a7..c4296055b36819a51b94b4c69cb3e375db0c36ec 100644 (file)
@@ -87,26 +87,20 @@ gtk_accel_label_class_init (GtkAccelLabelClass *class)
    * that use the shift key. If the text on this key isn't typically
    * translated on keyboards used for your language, don't translate
    * this.
-   * 
-   * Don't include the prefix "keyboard label|" in the translation.
    */
-  class->mod_name_shift = g_strdup (Q_("keyboard label|Shift"));
+  class->mod_name_shift = g_strdup (C_("keyboard label", "Shift"));
   /* This is the text that should appear next to menu accelerators
    * that use the control key. If the text on this key isn't typically
    * translated on keyboards used for your language, don't translate
    * this.
-   *
-   * Don't include the prefix "keyboard label|" in the translation.
    */
-  class->mod_name_control = g_strdup (Q_("keyboard label|Ctrl"));
+  class->mod_name_control = g_strdup (C_("keyboard label", "Ctrl"));
   /* This is the text that should appear next to menu accelerators
    * that use the alt key. If the text on this key isn't typically
    * translated on keyboards used for your language, don't translate
    * this.
-   *
-   * Don't include the prefix "keyboard label|" in the translation.
    */
-  class->mod_name_alt = g_strdup (Q_("keyboard label|Alt"));
+  class->mod_name_alt = g_strdup (C_("keyboard label", "Alt"));
   class->mod_separator = g_strdup ("+");
 #else /* GDK_WINDOWING_QUARTZ */
 
@@ -673,9 +667,8 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
        * that use the super key. If the text on this key isn't typically
        * translated on keyboards used for your language, don't translate
        * this.
-       * And do not translate the part before the |.
        */
-      g_string_append (gstring, Q_("keyboard label|Super"));
+      g_string_append (gstring, C_("keyboard label", "Super"));
       seen_mod = TRUE;
     }
   if (accelerator_mods & GDK_HYPER_MASK)
@@ -687,9 +680,8 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
        * that use the hyper key. If the text on this key isn't typically
        * translated on keyboards used for your language, don't translate
        * this.
-       * And do not translate the part before the |.
        */
-      g_string_append (gstring, Q_("keyboard label|Hyper"));
+      g_string_append (gstring, C_("keyboard label", "Hyper"));
       seen_mod = TRUE;
     }
   if (accelerator_mods & GDK_META_MASK)
@@ -702,9 +694,8 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
        * that use the meta key. If the text on this key isn't typically
        * translated on keyboards used for your language, don't translate
        * this.
-       * And do not translate the part before the |.
        */
-      g_string_append (gstring, Q_("keyboard label|Meta"));
+      g_string_append (gstring, C_("keyboard label", "Meta"));
 #else
       /* Command key symbol U+2318 PLACE OF INTEREST SIGN */
       g_string_append (gstring, "\xe2\x8c\x98");
@@ -721,12 +712,10 @@ _gtk_accel_label_class_get_accelerator_label (GtkAccelLabelClass *klass,
       switch (ch)
        {
        case ' ':
-         /* do not translate the part before the | */
-         g_string_append (gstring, Q_("keyboard label|Space"));
+         g_string_append (gstring, C_("keyboard label", "Space"));
          break;
        case '\\':
-         /* do not translate the part before the | */
-         g_string_append (gstring, Q_("keyboard label|Backslash"));
+         g_string_append (gstring, C_("keyboard label", "Backslash"));
          break;
        default:
          g_string_append_unichar (gstring, g_unichar_toupper (ch));
index cf06ed608676bf55a5e43798e0b11cc30fb9bae7..20b2d86c443c0a330eb06d0702de554e765b9705 100644 (file)
@@ -1796,14 +1796,11 @@ gtk_calendar_size_request (GtkWidget      *widget,
 
       priv->max_year_width = 0;
       /* Translators:  This is a text measurement template.
-       * Translate it to the widest year text. 
-       * 
-       * Don't include the prefix "year measurement template|" 
-       * in the translation.
+       * Translate it to the widest year text
        *
        * If you don't understand this, leave it as "2000"
        */
-      pango_layout_set_text (layout, Q_("year measurement template|2000"), -1);          
+      pango_layout_set_text (layout, C_("year measurement template", "2000"), -1);       
       pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
       priv->max_year_width = MAX (priv->max_year_width,
                                  logical_rect.width + 8);
@@ -1834,7 +1831,7 @@ gtk_calendar_size_request (GtkWidget        *widget,
   for (i = 0; i < 9; i++)
     {
       gchar buffer[32];
-      g_snprintf (buffer, sizeof (buffer), Q_("calendar:day:digits|%d"), i * 11);
+      g_snprintf (buffer, sizeof (buffer), C_("calendar:day:digits", "%d"), i * 11);
       pango_layout_set_text (layout, buffer, -1);        
       pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
       priv->min_day_width = MAX (priv->min_day_width,
@@ -1866,7 +1863,7 @@ gtk_calendar_size_request (GtkWidget        *widget,
     for (i = 0; i < 9; i++)
       {
        gchar buffer[32];
-       g_snprintf (buffer, sizeof (buffer), Q_("calendar:week:digits|%d"), i * 11);
+       g_snprintf (buffer, sizeof (buffer), C_("calendar:week:digits", "%d"), i * 11);
        pango_layout_set_text (layout, buffer, -1);       
        pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
        priv->max_week_char_width = MAX (priv->max_week_char_width,
@@ -2140,14 +2137,13 @@ calendar_paint_header (GtkCalendar *calendar)
    * gtkcalendar widget.  See strftime() manual for the format.
    * Use only ASCII in the translation.
    *
-   * Also look for the msgid "year measurement template|2000".  
+   * Also look for the msgid "2000".
    * Translate that entry to a year with the widest output of this
-   * msgid. 
-   * 
-   * Don't include the prefix "calendar year format|" in the 
-   * translation. "%Y" is appropriate for most locales.
+   * msgid.
+   *
+   * "%Y" is appropriate for most locales.
    */
-  strftime (buffer, sizeof (buffer), Q_("calendar year format|%Y"), tm);
+  strftime (buffer, sizeof (buffer), C_("calendar year format", "%Y"), tm);
   str = g_locale_to_utf8 (buffer, -1, NULL, NULL, NULL);
   layout = gtk_widget_create_pango_layout (widget, str);
   g_free (str);
@@ -2350,14 +2346,13 @@ calendar_paint_week_numbers (GtkCalendar *calendar)
        * localized digits or the ones used in English (0123...).
        *
        * Translate to "%Id" if you want to use localized digits, or
-       * translate to "%d" otherwise.  Don't include the
-       * "calendar:week:digits|" part in the translation.
+       * translate to "%d" otherwise.
        *
        * Note that translating this doesn't guarantee that you get localized
-       * digits.  That needs support from your system and locale definition
+       * digits. That needs support from your system and locale definition
        * too.
        */
-      g_snprintf (buffer, sizeof (buffer), Q_("calendar:week:digits|%d"), week);
+      g_snprintf (buffer, sizeof (buffer), C_("calendar:week:digits", "%d"), week);
       pango_layout_set_text (layout, buffer, -1);
       pango_layout_get_pixel_extents (layout, NULL, &logical_rect);
 
@@ -2488,14 +2483,13 @@ calendar_paint_day (GtkCalendar *calendar,
    * localized digits or the ones used in English (0123...).
    *
    * Translate to "%Id" if you want to use localized digits, or
-   * translate to "%d" otherwise.  Don't include the "calendar:day:digits|"
-   * part in the translation.
+   * translate to "%d" otherwise.
    *
    * Note that translating this doesn't guarantee that you get localized
-   * digits.  That needs support from your system and locale definition
+   * digits. That needs support from your system and locale definition
    * too.
    */
-  g_snprintf (buffer, sizeof (buffer), Q_("calendar:day:digits|%d"), day);
+  g_snprintf (buffer, sizeof (buffer), C_("calendar:day:digits", "%d"), day);
 
   /* Get extra information to show, if any: */
 
index 1142cd94fc508fca3625ecc5b586957482f46eac..9b10d8603515107e81c779a48a35c8262ee37957 100644 (file)
@@ -238,10 +238,9 @@ convert_keysym_state_to_string (GtkCellRendererAccel *accel,
 {
   if (keysym == 0 && keycode == 0)
     /* This label is displayed in a treeview cell displaying
-     * a disabled accelerator key combination. Only include
-     * the text after the | in the translation.
+     * a disabled accelerator key combination.
      */
-    return g_strdup (Q_("Accelerator|Disabled"));
+    return g_strdup (C_("Accelerator", "Disabled"));
   else 
     {
       if (accel->accel_mode == GTK_CELL_RENDERER_ACCEL_MODE_GTK)
index 4dc123d303d29b01bb181b2dd88312884e92decd..3dec5b758d0568adaf533c4b35d023256fde515b 100644 (file)
@@ -358,8 +358,7 @@ recompute_label (GtkCellRendererProgress *cellprogress)
   if (priv->text)
     label = g_strdup (priv->text);
   else if (priv->pulse < 0)
-    /* do not translate the part before the | */
-    label = g_strdup_printf (Q_("progress bar label|%d %%"), priv->value);
+    label = g_strdup_printf (C_("progress bar label", "%d %%"), priv->value);
   else
     label = NULL;
  
@@ -446,7 +445,7 @@ gtk_cell_renderer_progress_get_size (GtkCellRenderer *cell,
 
   if (priv->min_w < 0)
     {
-      text = g_strdup_printf (Q_("progress bar label|%d %%"), 100);
+      text = g_strdup_printf (C_("progress bar label", "%d %%"), 100);
       compute_dimensions (cell, widget, text,
                          &priv->min_w,
                          &priv->min_h);
index 8ce3aa988d1fee18813d18a974e5145635fa5921..54625757059e464e59595ba813d018bccc385ebd 100644 (file)
@@ -542,7 +542,7 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context,
   const char *system_context_id; 
   
   system_context_id = _gtk_im_module_get_default_context_id (context->priv->client_window);
-  system_menuitem = menuitem = gtk_radio_menu_item_new_with_label (group, Q_("input method menu|System"));
+  system_menuitem = menuitem = gtk_radio_menu_item_new_with_label (group, C_("input method menu", "System"));
   if (!user_context_id)
     gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (menuitem), TRUE);
   group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (menuitem));
@@ -626,7 +626,7 @@ gtk_im_multicontext_append_menuitems (GtkIMMulticontext *context,
           char *text;
 
           label = gtk_bin_get_child (GTK_BIN (system_menuitem));
-          text = g_strdup_printf (Q_("input method menu|System (%s)"), translated_name);
+          text = g_strdup_printf (C_("input method menu", "System (%s)"), translated_name);
           gtk_label_set_text (GTK_LABEL (label), text);
           g_free (text);
         }     
index 43a1b2cd3e73e198dd72fb0edc10b003a6b5b56c..54ea3c7897109361aa60aa03430680bd1200ef13 100644 (file)
@@ -771,21 +771,17 @@ gtk_recent_chooser_menu_create_item (GtkRecentChooserMenu *menu,
       
       /* avoid clashing mnemonics */
       if (count <= 10)
-        /* This is the label format that is used for the first 10 items 
+        /* This is the label format that is used for the first 10 items
          * in a recent files menu. The %d is the number of the item,
          * the %s is the name of the item. Please keep the _ in front
          * of the number to give these menu items a mnemonic.
-         *
-         * Don't include the prefix "recent menu label|" in the translation.
          */
-        text = g_strdup_printf (Q_("recent menu label|_%d. %s"), count, escaped);
+        text = g_strdup_printf (C_("recent menu label", "_%d. %s"), count, escaped);
       else
-        /* This is the format that is used for items in a recent files menu. 
-         * The %d is the number of the item, the %s is the name of the item. 
-         *
-         * Don't include the prefix "recent menu label|" in the translation.
+        /* This is the format that is used for items in a recent files menu.
+         * The %d is the number of the item, the %s is the name of the item.
          */
-        text = g_strdup_printf (Q_("recent menu label|%d. %s"), count, escaped);
+        text = g_strdup_printf (C_("recent menu label", "%d. %s"), count, escaped);
       
       item = gtk_image_menu_item_new_with_mnemonic (text);
       
index d17585139f8ee01ff87e43ee10342c138ca99c04..af27691b765ae7d82c0a751b7f2e0bb9b0988b44 100644 (file)
@@ -164,10 +164,8 @@ cb_query_tooltip (GtkWidget  *button,
        * as used in the tooltip, eg. "49 %".
        * Translate the "%d" to "%Id" if you want to use localised digits,
        * or otherwise translate the "%d" to "%d".
-       * Do not translate and do not include the "volume percentage|"
-       * part in the translation!
        */
-      str = g_strdup_printf (Q_("volume percentage|%d %%"), percent);
+      str = g_strdup_printf (C_("volume percentage", "%d %%"), percent);
     }
 
   gtk_tooltip_set_text (tooltip, str);
index 4bae8f38f5f0cce98d6168471b293b1d2ba4a474..55b7a0a8bda882b6d76e3c99bd7f0ad73312da91 100644 (file)
@@ -92,7 +92,7 @@ all-no:
 
 $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
        $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
-         --add-comments --keyword=_ --keyword=N_ --keyword=Q_ \
+         --add-comments --keyword=_ --keyword=N_ --keyword=C_:1c,2 \
           --flag=g_strdup_printf:1:c-format \
           --flag=g_string_printf:2:c-format \
           --flag=g_string_append_printf:2:c-format \